<?php
namespace app\admin\controller;
/**
 * 课表控制器
 */
/**
  * 
  */
 class Course extends AdminBase
{
    
    /**
     * 课程列表
     */
    
    /**
     * 课程列表
     */
    public function courseList()
    {
        
        $this->assign('list', $this->logicCourse->getCourseList());
        
        return $this->fetch('course_list');
    }
    public function courseteaList()
    {
        
        $this->assign('list', $this->logicCourse->getCourseList());
        
        return $this->fetch('course_list');
    }
    public function coursestuList()
    {
        
        $this->assign('list', $this->logicCourse->getCourseList());
        
        return $this->fetch('course_list');
    }
    
    /**
     * 课程添加
     */
    public function courseAdd()
    {
        
        IS_POST && $this->jump($this->logicCourse->courseEdit($this->param));
        
        return $this->fetch('course_edit');
    }
    
    /**
     * 课程编辑
     */
    public function courseEdit()
    {
        
        IS_POST && $this->jump($this->logicCourse->courseEdit($this->param));
        
        $info = $this->logicCourse->getCourseInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('course_edit');
    }
    
    /**
     * 课程删除
     */
    public function courseDel($id = 0)
    {
        
        $this->jump($this->logicCourse->courseDel(['id' => $id]));
    }
}